<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <meta name="csrf-token" content="{{ csrf_token() }}">

</head>
<body>
  <form action="{{url('/insert')}}" onsubmit="return false" method="post">
    {{csrf_field()}}

    <button id="btn">tijiao</button>
  </form>
    <script type="text/javascript" src="/public/home/js/jquery.js" ></script>

  <script type="text/javascript">
  $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
  });

  $('#btn').click(function(){
     //发送ajax
    $.post('/insert',{id:1},function(data){
      console.log(data);
    })
  })

  
  </script>
</body>
</html>